package utils;

/**
 * Definitions and modifiers of the configuration.
 * @author Cassio Soares Cabral
 *
 */
public class Config {
	
	private static Config instance = null;
	
	/**
	 * Config constructor.
	 */
	private Config(){
	
	}
	
	/**
	 * Method getInstance from singleton pattern.
	 * @return Instance
	 */
	public static Config getInstance() {
		if (instance == null) {
			return instance = new Config();
		}
		return instance;
	}
	
	
	static private String DBName = "marketingjoy";
	static private String DBUserName = "root";
	static private String DBPassword = "root";
	
	
	
	/**
	 * Get the user name.
	 * @return userName
	 */
	public static String getDBUserName() {
		return DBUserName;
	}
	
	/**
	 * Set the user name.
	 * @param userName
	 */
	public static void setDBUserName(String userName) {
		DBUserName = userName;
	}
	
	/**
	 * Get the password.
	 * @return Password
	 */
	public static String getDBPassword() {
		return DBPassword;
	}
	
	/**
	 * Set the password.
	 * @param password
	 */
	public static void setDBPassword(String password) {
		DBPassword = password;
	}
	
	/**
	 * Get the database name
	 * @return database name
	 */
	public static String getDBName() {
		return DBName;
	}
	
	/**
	 * Set the database name.
	 * @param name
	 */
	public static void setDBName(String name) {
		DBName = name;
	}

}
